#include <dos.h>
#include  <stdlib.h>
#include <graphics.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>

void draw_plane(int,int,int);

void main()
{
	int maxx,maxy,driver,mode,i;
	driver=DETECT;
	initgraph(&driver,&mode,"C:\\borlandc\\bgi");
	maxx=getmaxx();
	maxy=getmaxy();
	setbkcolor(LIGHTGRAY);
	for(i=1;i<5;i++)
		draw_plane(300+50*i,200+30*i,i-1);
	draw_plane(300,200+,0);
	getch();
}

//@function：飞机
void draw_plane(int x,int y,int col)
{
	int color[5]={WHITE,BLUE,LIGHTBLUE,RED,YELLOW};
	int right[]={x+3,y-6,x+16,y-1,x+18,y+2,x+3,y+1,x+3,y-6};
	int left[]={x-4,y-6,x-16,y-1,x-18,y+2,x-4,y+1,x-4,y-6};
	int bottom[]={x-2,y+17,x-10,y+20,x-11,y+22,x+11,y+22,x+10,y+20,x+2,y+17,x-2,y+17};
	setcolor(BLACK);
	setfillstyle(1,RED^BLUE);
	fillpoly(5,right);
	fillpoly(5,left);
	fillpoly(8,bottom);
	setfillstyle(1,color[col]);
	sector(x,y,0,360,3,20);

	setcolor(BLACK);
	setfillstyle(SOLID_FILL,YELLOW^RED^GREEN);
	fillellipse(x,y-12,2,5);

	bar(x-1,y-5,x+1,y+5);
	setcolor(RED);
	setlinestyle(SOLID_LINE,0,NORM_WIDTH);
	rectangle(x-20,y-22,x+20,y+22);
}